using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._NetworkDataset
{
    /// <summary>
    /// <para>Create Network Dataset</para>
    /// <para>Creates a network dataset in an existing feature dataset. The network dataset can be used to perform network analysis on the data in the feature dataset.</para>
    /// <para>在现有要素数据集中创建网络数据集。网络数据集可用于对要素数据集中的数据进行网络分析。</para>
    /// </summary>    
    [DisplayName("Create Network Dataset")]
    public class CreateNetworkDataset : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateNetworkDataset()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_feature_dataset">
        /// <para>Target Feature Dataset</para>
        /// <para><xdoc>
        ///   <para>The feature dataset where the network dataset will be created. The feature dataset should contain the source feature classes that will participate in the network dataset.</para>
        ///   <para>If the feature dataset is in an enterprise geodatabase, the feature dataset and all source feature classes cannot be versioned.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将在其中创建网络数据集的要素数据集。要素数据集应包含将参与网络数据集的源要素类。</para>
        ///   <para>如果要素数据集位于企业级地理数据库中，则无法对要素数据集和所有源要素类进行版本化。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_name">
        /// <para>Network Dataset Name</para>
        /// <para>The name of the network dataset to be created. The Target Feature Dataset and its parent geodatabase must not already contain a network dataset with this name.</para>
        /// <para>要创建的网络数据集的名称。目标要素数据集及其父地理数据库不得已包含具有此名称的网络数据集。</para>
        /// </param>
        /// <param name="_source_feature_class_names">
        /// <para>Source Feature Classes</para>
        /// <para><xdoc>
        ///   <para>The names of the feature classes to be included in the network dataset as network source features. Specify this parameter as a list of strings.</para>
        ///   <para>You must choose at least one line feature class that is not a turn feature class. This line feature class will act as an edge source in the network dataset. You can optionally choose point feature classes to act as junction sources in the network dataset and turn feature classes to act as turn sources.</para>
        ///   <para>All source feature classes must reside in the Target Feature Dataset and must not already participate in a geometric network, a utility network, or another network dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要作为网络源要素包含在网络数据集中的要素类的名称。将此参数指定为字符串列表。</para>
        ///   <para>必须至少选择一个不是转弯要素类的线要素类。此线要素类将充当网络数据集中的边源。您可以选择点要素类作为网络数据集中的交汇点源，并将要素类转向作为转弯源。</para>
        ///   <para>所有源要素类必须位于目标要素数据集中，并且不得已参与几何网络、公共设施网络或其他网络数据集。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_elevation_model">
        /// <para>Elevation Model</para>
        /// <para><xdoc>
        ///   <para>Specifies the model to be used to control vertical connectivity in the network dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Elevation fields— Coincident endpoints with the same elevation field values are considered connected in the network dataset. This is the default.</bullet_item><para/>
        ///     <bullet_item>Z coordinates—The z-coordinate values in the line feature geometry determine vertical connectivity. Coincident points are considered connected only if they have matching z-coordinate values.</bullet_item><para/>
        ///     <bullet_item>No elevation— Network dataset connectivity is determined only by horizontal coincidence.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于控制网络数据集中的垂直连通性的模型。</para>
        ///   <bulletList>
        ///     <bullet_item>高程字段 - 在网络数据集中，具有相同高程字段值的重合端点被视为已连接。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>Z 坐标 - 线要素几何中的 z 坐标值用于确定垂直连通性。仅当重合点具有匹配的 z 坐标值时，它们才被视为连接点。</bullet_item><para/>
        ///     <bullet_item>无高程 - 网络数据集连通性仅由水平重合确定。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public CreateNetworkDataset(object _feature_dataset, object _out_name, List<object> _source_feature_class_names, _elevation_model_value _elevation_model)
        {
            this._feature_dataset = _feature_dataset;
            this._out_name = _out_name;
            this._source_feature_class_names = _source_feature_class_names;
            this._elevation_model = _elevation_model;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Create Network Dataset";

        public override string CallName => "na.CreateNetworkDataset";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_feature_dataset, _out_name, _source_feature_class_names, _elevation_model.GetGPValue(), _out_network_dataset];

        /// <summary>
        /// <para>Target Feature Dataset</para>
        /// <para><xdoc>
        ///   <para>The feature dataset where the network dataset will be created. The feature dataset should contain the source feature classes that will participate in the network dataset.</para>
        ///   <para>If the feature dataset is in an enterprise geodatabase, the feature dataset and all source feature classes cannot be versioned.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将在其中创建网络数据集的要素数据集。要素数据集应包含将参与网络数据集的源要素类。</para>
        ///   <para>如果要素数据集位于企业级地理数据库中，则无法对要素数据集和所有源要素类进行版本化。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Feature Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _feature_dataset { get; set; }


        /// <summary>
        /// <para>Network Dataset Name</para>
        /// <para>The name of the network dataset to be created. The Target Feature Dataset and its parent geodatabase must not already contain a network dataset with this name.</para>
        /// <para>要创建的网络数据集的名称。目标要素数据集及其父地理数据库不得已包含具有此名称的网络数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Dataset Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_name { get; set; }


        /// <summary>
        /// <para>Source Feature Classes</para>
        /// <para><xdoc>
        ///   <para>The names of the feature classes to be included in the network dataset as network source features. Specify this parameter as a list of strings.</para>
        ///   <para>You must choose at least one line feature class that is not a turn feature class. This line feature class will act as an edge source in the network dataset. You can optionally choose point feature classes to act as junction sources in the network dataset and turn feature classes to act as turn sources.</para>
        ///   <para>All source feature classes must reside in the Target Feature Dataset and must not already participate in a geometric network, a utility network, or another network dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要作为网络源要素包含在网络数据集中的要素类的名称。将此参数指定为字符串列表。</para>
        ///   <para>必须至少选择一个不是转弯要素类的线要素类。此线要素类将充当网络数据集中的边源。您可以选择点要素类作为网络数据集中的交汇点源，并将要素类转向作为转弯源。</para>
        ///   <para>所有源要素类必须位于目标要素数据集中，并且不得已参与几何网络、公共设施网络或其他网络数据集。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source Feature Classes")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _source_feature_class_names { get; set; }


        /// <summary>
        /// <para>Elevation Model</para>
        /// <para><xdoc>
        ///   <para>Specifies the model to be used to control vertical connectivity in the network dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Elevation fields— Coincident endpoints with the same elevation field values are considered connected in the network dataset. This is the default.</bullet_item><para/>
        ///     <bullet_item>Z coordinates—The z-coordinate values in the line feature geometry determine vertical connectivity. Coincident points are considered connected only if they have matching z-coordinate values.</bullet_item><para/>
        ///     <bullet_item>No elevation— Network dataset connectivity is determined only by horizontal coincidence.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于控制网络数据集中的垂直连通性的模型。</para>
        ///   <bulletList>
        ///     <bullet_item>高程字段 - 在网络数据集中，具有相同高程字段值的重合端点被视为已连接。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>Z 坐标 - 线要素几何中的 z 坐标值用于确定垂直连通性。仅当重合点具有匹配的 z 坐标值时，它们才被视为连接点。</bullet_item><para/>
        ///     <bullet_item>无高程 - 网络数据集连通性仅由水平重合确定。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Elevation Model")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _elevation_model_value _elevation_model { get; set; }

        public enum _elevation_model_value
        {
            /// <summary>
            /// <para>Elevation fields</para>
            /// <para>Elevation fields— Coincident endpoints with the same elevation field values are considered connected in the network dataset. This is the default.</para>
            /// <para>高程字段 - 在网络数据集中，具有相同高程字段值的重合端点被视为已连接。这是默认设置。</para>
            /// </summary>
            [Description("Elevation fields")]
            [GPEnumValue("ELEVATION_FIELDS")]
            _ELEVATION_FIELDS,

            /// <summary>
            /// <para>Z coordinates</para>
            /// <para>Z coordinates—The z-coordinate values in the line feature geometry determine vertical connectivity. Coincident points are considered connected only if they have matching z-coordinate values.</para>
            /// <para>Z 坐标 - 线要素几何中的 z 坐标值用于确定垂直连通性。仅当重合点具有匹配的 z 坐标值时，它们才被视为连接点。</para>
            /// </summary>
            [Description("Z coordinates")]
            [GPEnumValue("Z_COORDINATES")]
            _Z_COORDINATES,

            /// <summary>
            /// <para>No elevation</para>
            /// <para>No elevation— Network dataset connectivity is determined only by horizontal coincidence.</para>
            /// <para>无高程 - 网络数据集连通性仅由水平重合确定。</para>
            /// </summary>
            [Description("No elevation")]
            [GPEnumValue("NO_ELEVATION")]
            _NO_ELEVATION,

        }

        /// <summary>
        /// <para>Output Network Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_network_dataset { get; set; }


        public CreateNetworkDataset SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}